package com;

public class stream_controcl {
    public static void main(String[] args) {
        for (int i = 1; i < 10; i++) {
            System.out.printf("i = %d \t",i);
        }

        System.out.print("\n这个是for循环============== \n");

        int n = 0;
        while (n < 10){
            if(n == 5){
                n++;
                continue;
            }
            System.out.printf("n = %d \t",n);
            n++;
        }

        System.out.print("\n这个是while循环============== \n");

        int a = 5;
        switch(a){
            case 1:
                System.out.println("今天星期一");
                break;
            case 2:
                System.out.println("今天星期二");
                break;
            case 3:
                System.out.println("今天星期三");
                break;
            case 4:
                System.out.println("今天星期四");
                break;
            case 5:
                System.out.println("今天星期五");
                break;
            case 6:
                System.out.println("今天星期六");
                break;
            case 7:
                System.out.println("今天星期七");
                break;
        }

        System.out.print("这个是switch============== \n");

        int num = 0;
        do{
            System.out.printf("num = %d \t",num);
            num++;
        }while(n < 10);

        System.out.println("\n======================\n");


    }
}
